package ttOrder.model.vo;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class OrderVO {
	
	private int id;
	private int tableId;
	private DinnerTableVO dinnerTable;
	private int userId;
	private Date orderTime;
	private String time;
	private int vip;
	private int orderStatus;
	private List<OrderDetailVO> orderDetailList;
	private double totalPrice;
	
	public OrderVO() {
		super();
	}
	
	public OrderVO(int id) {
		super();
		this.id = id;
	}
	
	public OrderVO(int tableId,int orderStatus) {
		super();
		this.tableId = tableId;
		this.orderStatus = orderStatus;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getTableId() {
		return tableId;
	}
	public void setTableId(int tableId) {
		this.tableId = tableId;
	}
	
	public Date getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
		this.setTime(orderTime);
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getOrderStatus() {
		return orderStatus;
	}
	public void setOrderStatus(int orderStatus) {
		this.orderStatus = orderStatus;
	}
	public DinnerTableVO getDinnerTable() {
		return dinnerTable;
	}
	public void setDinnerTable(DinnerTableVO dinnerTable) {
		this.dinnerTable = dinnerTable;
	}
	public List<OrderDetailVO> getOrderDetailList() {
		return orderDetailList;
	}
	public void setOrderDetailList(List<OrderDetailVO> orderDetailList) {
		this.orderDetailList = orderDetailList;
	}
	public double getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
		/*for (OrderDetailVO orderDetailVO : orderDetailList) {
			
		}*/
	}
	public int getVip() {
		return vip;
	}
	public void setVip(int vip) {
		this.vip = vip;
	}

	public String getTime() {
		return time;
	}

	public void setTime(Date orderTime) {
        this.time = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(orderTime);
	}
	
	
}
